<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/5/8
  Time: 15:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改课程信息</title>
</head>
<body>
<div style="border: 1px solid #E6E6E6;width: 350px;margin:auto;">
<form id="editCourseForm" style="margin-top: 20px;font-size: 15px;font-family: 微软雅黑;">
    <div style="margin-bottom:20px;text-align: center;">
        <input class="easyui-textbox" name="number" value="${course.number}" data-options="label:'课程编号',width:300,height:30,prompt:'长度为10',required:true,missingMessage:'课程编号不能为空！'">
    </div>
    <div style="margin-bottom:20px;text-align: center;">
        <input class="easyui-textbox" name="name" value="${course.name}" data-options="label:'课程名称',width:300,height:30,prompt:'长度最长为20',required:true,missingMessage:'课程名称不能为空！'">
    </div>
    <div style="margin-bottom:20px;text-align: center;">
        <input class="easyui-textbox" name="time" value="${course.time}" data-options="label:'上课时间',width:300,height:30">
    </div>
    <div style="margin-bottom:20px;text-align: center;">
        <input class="easyui-textbox" name="address" value="${course.address}" data-options="label:'上课地点',width:300,height:30">
    </div>
    <input type="hidden" name="teacherNumber" value="${course.teacherNumber}">
    <input type="hidden" name="teacherName" value="${course.teacherName}">
</form>
<div style="text-align:center;padding:5px 0">
    <a class="easyui-linkbutton" onclick="$('#editCourseForm').form('submit');" style="width:80px">提交</a>
    <a class="easyui-linkbutton" onclick="$('#editCourseForm').form('clear');" style="width:80px">重置</a>
</div>
</div>
<script>
    $(function () {
        $('#editCourseForm').form({
            url:'../course/updateCourse',
            type:'post',
            success:function(data){
                var data = eval('(' + data + ')');
                $.messager.alert('提示', data.message, 'info');
            }
        });
    });
</script>
</body>
</html>
